package com.hmall.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.order.pojo.Order;
import com.hmall.order.pojo.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {
   @Select("select tod.* from tb_order tbo left join mall_db_order.tb_order_detail tod on tbo.id = tod.order_id\n" +
           "         where tbo.create_time<#{time} and tbo.status=1 ")
    List<OrderDetail> selectOutTimePay(LocalDateTime time);
}
